import { requestClient, baseRequestClient } from '#/api/request';

// 获取机构下拉框下拉选(通用)
export async function getCompanyTree() {
  return baseRequestClient.get('/ChargeSystem/khzywh/companyTree');
}
// 导出历史表格（通用）
// /ChargeSystem/resource/getReportExportHistoryPage?page=1&limit=10&exportType=换热站/小区/用户/面积变更
export async function getReportExportHistoryPage(data: any) {
  return baseRequestClient.get(
    `/ChargeSystem/resource/getReportExportHistoryPage?page=${data.page}&limit=${data.limit}&exportType=${data.exportType}`,
  );
}
// 换热站报表-------------------------------------------------------------
// 获取表格数据
export async function heatExchangeStationReportPage(data: any) {
  return baseRequestClient.get(
    `/ChargeSystem/resource/heatExchangeStationReportPage?page=${data.page}&limit=${data.limit}&companyNode=${data.companyNode}&businessType=${data.businessType}&feeYear=${data.feeYear}&heatExchangeStationNode=${data.heatExchangeStationNode}`,
  );
}
// 导出报表  companyNode
// /ChargeSystem/resource/exportHeatExchangeStationReport?companyNode=1-1,2-2&page=1&limit=10&businessType=供热/制冷/供水/光伏&feeYear=2025&heatExchangeStationNode=1-1,2-2
export async function exportHeatExchangeStationReport(data: any) {
  return baseRequestClient.get(
    `/ChargeSystem/resource/exportHeatExchangeStationReport?companyNode=${data.companyNode}&page=${data.page}&limit=${data.limit}&businessType=${data.businessType}&feeYear=${data.feeYear}&heatExchangeStationNode=${data.heatExchangeStationNode}`,
  );
}
// 小区明细表----------------------------------------------------------------
// 小区查询【villageNode左边树形节点   companyNode归属机构节点】
export async function villageReportPage(data: any) {
  return baseRequestClient.get(
    `/ChargeSystem/resource/villageReportPage?page=${data.page}&limit=${data.limit}&villageNode=${data.villageNode}&companyNode=${data.companyNode}`,
  );
}
// 小区导出
export async function exportVillageReport(data: any) {
  return baseRequestClient.get(
    `/ChargeSystem/resource/exportVillageReport?page=${data.page}&limit=${data.limit}&villageNode=${data.villageNode}&companyNode=${data.companyNode}`,
  );
}
// 用户明细表----------------------------------------------------------------
// 用户查询
export async function houseReportPage(data: any) {
  return baseRequestClient.post(`/ChargeSystem/resource/houseReportPage`, data);
}
// 用户导出
export async function exportHouseReport(data: any) {
  return baseRequestClient.post(`/ChargeSystem/resource/exportHouseReport`, data
  );
}
// 面积变更报表----------------------------------------------------------------
// 1.页面数据查询接口 【houseNode左边树形节点   companyNode归属机构节点】
export async function getAreaUpdateReportPage(data: any) {
  return baseRequestClient.get(
    `/ChargeSystem/resource/areaUpdateReportPage?page=${data.page}&limit=${data.limit}&houseNode=${data.houseNode}&companyNode=${data.companyNode}&updateTime=${data.updateTime}`,
  );
}
// 导出
export async function exportAreaUpdateReport(data: any) {
  return baseRequestClient.get(
    `/ChargeSystem/resource/exportAreaUpdateReport?page=${data.page}&houseNode=${data.houseNode}&companyNode=${data.companyNode}&updateTime=${data.updateTime}`,
  );
}
